<?php
/**
 * Created by PhpStorm.
 * User: boye009
 * Date: 2016/3/15
 * Time: 11:06
 */

namespace Test\Controller;

use Common\Api\BoyeServiceApi;

class TestRedEnvelopeController extends TestController{

    public function query(){

        if(IS_POST){

            $data=array(
                'uid' => I('post.uid',0),
                'use_status' => I('post.use_status',-1),
                'api_ver'=>$this->api_ver,
                'notify_id'=>$this->notify_id,
                'type'=>'BY_RedEnvelope_query',
                'alg'=>'md5',
            );

            $service = new BoyeServiceApi();

            $result = $service->callRemote("",$data,true);

            $this->parseResult($result);

        }

        $this->display();

    }


    private function parseResult($result){
        echo "解密后数据：";
        dump($result);
    }

}